package tests.registration;

import static org.junit.Assert.*;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;

import org.junit.Before;
import org.junit.Test;

import registration.model.Registration;
import tests.TestUtil;

public class RegistrationTest {
	Registration registration;

	@Before
	public void setUp() {
		registration = new Registration();
	}

	@Test
	public void registrateTime() throws FileNotFoundException,
			UnsupportedEncodingException {
		File file = new File("testFiles/registrationTestFiles/time.txt");
		registration.registrateTime(file);
		assertEquals(
				TestUtil.readFile("testFiles/registrationTestFiles/registrateTime.txt"),
				TestUtil.readFile("testFiles/registrationTestFiles/time.txt"));
		file.delete();
	}
}
